package jlib.component.button
{
	import flash.display.MovieClip;
	import flash.events.Event;
	import flash.events.MouseEvent;
	import flash.net.URLRequest;
	import flash.net.navigateToURL;
	import jlib.component.button.FrameButton;
	
	public class LinkButton extends FrameButton
	{
		private var m_url:String;
		private var m_window:String;
		
		public function LinkButton(wrappee:MovieClip=null): void {
			super(wrappee);
			this.addEventListener(MouseEvent.CLICK, clickHandler );
		}
		
		protected function clickHandler(e:Event): void {
			navigateToURL(new URLRequest(m_url), m_window);
		}
		
		/** 링크 될 url */
		public function getLink(): String { return this.m_url; }
		/** 링크 될 url */
		public function setLink(url:String): void { this.m_url = url; }
		/** 열릴 윈도우 모드 */
		public function getWindow():String { return m_window; }
		/** 열릴 윈도우 모드 */
		public function setWindow(window:String): void { this.m_window = window; }
		
	}//c
}